{% extends "base_step.html" %}
{% load i18n %}
{% load lp_extras %}
{% block content %}
{% if error_msg %}<div class="error_msg">{{ error_msg }}</div>{% endif %}
<div id="mysolution"><table id="solutiontable">
<tr><th>{% trans "Status" %}: </th><td>{{ solution.status }}</td></tr>
<tr><th>{% trans "Objective values" %}: </th><td>{% for val in solution.values.items %}{{ val.0 }} = {{ val.1 }} {% if not forloop.last %} | {% endif %} {% endfor %}</td></tr>
<tr><th>{% trans "Objective function" %}: </th><td>{{ project.objname }} = {{ solution.objective }}</td></tr>
{% if solution.bound_obj %}
<tr><th>{% trans "Objective coefficient" %}: </th><td>
<table id="intable">
<tr><th>{% trans "row" %}</th><th>{% trans "value" %}</th><th>{% trans "max inc." %}</th><th>{% trans "max dec." %}</th></tr>
{% for key in solution.bound_obj %}<tr><td>{{ key }}</td>{% for item in solution.bound_obj|list_nest:key %}<td>{{ item }}</td>{% endfor %}</tr>{% endfor %}
</table>
</td></tr>
{% endif %}
{% if solution.bound_const %}
<tr><th>{% trans "Constraint bounds" %}: </th><td>
<table id="intable2">
<tr><th>{% trans "row" %}</th><th>{% trans "value" %}</th><th>{% trans "max inc." %}</th><th>{% trans "max dec." %}</th></tr>
{% for key in solution.bound_const %}<tr><td>{{ key }}</td>{% for item in solution.bound_const|list_nest:key %}<td>{{ item }}</td>{% endfor %}</tr>{% endfor %}
</table>
</td></tr>
{% endif %}
</table></div>
<div id="solution_data">
<div id="solfile" class="{{ solfile.status }}"><pre>{{ solfile.content }}</pre></div>
<div id="bodfile" class="{{ bodfile.status }}"><pre>{{ bodfile.content }}</pre></div>
</div>
<div class="buttons" id="button">
    <input type="button" value="{% trans "Back" %}" onClick="window.location.replace('{% url lp.lpx.views.step3 project.id %}');" />
</div>
{% endblock content %}
